fix(rivetkit): bind methods through createWriteThroughProxy#4987
Conversation
|
🚅 Deployed to the rivet-pr-4987 environment in rivet-frontend
|
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR Review: fix(rivetkit): bind methods through createWriteThroughProxyOverviewThis PR fixes actor state not being tracked when methods are called on complex objects like The PR also:
IssuesMissing NaN/Infinity validation The old Map key is not validated through the proxy
The old function ended with No cleanup / unsubscribe for the
onValidate(_path: string, newValue: unknown) {
beforeChange?.(newValue);
return true;
},This is fine but an unchecked throw from SuggestionsTest coverage gap: Map/Set method mutations through There is no test for test("beforeChange rejects non-serializable Map value", () => {
const state = createWriteThroughProxy(
{ m: new Map<string, unknown>() },
vi.fn(),
(v) => assertJsonCompatValue(v),
);
expect(() => state.m.set("k", () => {})).toThrow(TypeError);
expect(state.m.has("k")).toBe(false);
});Dropped In the lockfile,
The lockfile notes a CWE-502 deprecation on Strengths
|
b150344 to
fc4756e
Compare
af6e0e4 to
3be897d
Compare
3be897d to
c39972c
Compare
fc4756e to
5ec0839
Compare
5ec0839 to
4ff7adb
Compare
c39972c to
add44af
Compare
add44af to
4455290
Compare
b18ec51 to
4fbdc66
Compare
77e9b2f to
ce604d2
Compare
ce604d2 to
342a262
Compare
342a262 to
3d9e480
Compare
3d9e480 to
8c70217
Compare
8708f6b to
e2a084d
Compare
8c70217 to
00af8a0
Compare
e2a084d to
52e743c
Compare
00af8a0 to
ad1ebe6
Compare
ad1ebe6 to
6d4d578
Compare
6d4d578 to
d02776c
Compare

Fixes an error that occurs when inspector state attempts to serialize non trivial values (ie
Date).